<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/commons/global.jsp" %>

<!-- 上传部分 -->
<link href="${path}/static/uploadify/uploadify.css" rel="stylesheet" type="text/css">
<script type="text/javascript"  src="${path}/static/uploadify/jquery.uploadify.js"></script>

<script type="text/javascript">
    $(function() {

        $("#p_upload").uploadify({
            'height'        : 27,
            'width'         : 120,
            'buttonText'    : 'Excel模板',
            'swf': '${path}/static/uploadify/uploadify.swf',
            'uploader': 'appVip/uploadExcel',
            'cancelImg': '${path}/static/uploadify/uploadify-cancel.png',
            'auto'          : true, //设置auto为true，当文件被添加至上传队列时，将会自动上传。
            'fileSizeLimit' : '512000KB', // 50M
            'fileTypeExts'  : '*.xls;',
            'uploadLimit' : 100,
            'onUploadStart' : function(file) {

            },
            'onUploadSuccess':function(file, data, response){
                data = $.parseJSON( data );
                if(data.success){
                    $("#photo").val( $("#photo").val()+data.msg+";");
                    parent.$.modalDialog.openner_dataGrid.datagrid('reload');
                    parent.$.modalDialog.handler.dialog('close');
                    searchUserFun();
                }else{
                    parent.$.messager.alert('提示',data.msg, 'warning');
                    $("#photo").val("");
                }
            },
            'onUploadComplete':function(res){

            }
        });

    });
</script>

<div class="easyui-layout" data-options="fit:true,border:false">
    <div data-options="region:'center',border:false" style="overflow: hidden;padding: 3px;">
        <form id="appUserAddUploadForm" method="post" enctype="multipart/form-data">
            <table class="grid">
                <tr>
                    <td colspan="2">
                        导入说明：
                        <br>1、带红色*的为必填项,如出现空,程序会进行数据过滤,程序会过滤掉当前记录,务必检查是否为空.
                        <br>2、登录名不能重复
                        <br>3.推荐人不填写则默认为不存在
                        <br><span style="color: red;">4.推荐人必须在被推荐人前面填写。</span>
                    </td>
                </tr>
                <tr>

                    <td>文件上传</td>
                    <td>
                        <input id="p_upload" name="p_upload" type="file" multiple="true">
                        <input type="hidden" name="photo" id="photo"  data-options="required:true"  >
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>